#ifndef CRAZY_H_
#define CRAZY_H_

#include "shared.h"

typedef struct hostTCP{
    char host_dir[HOST_DIR_SIZE+1];
    char service[HOST_SERVICE_SIZE+1];
}hostTCP;

typedef struct hostMSGQ{
    int q_key;
}hostMSGQ;

typedef struct hostFIFO{
	char fifo_name[FIFO_NAME_LEN];
}hostFIFO;

typedef struct hostSHM{
    int shm_id;
    int sem_id;
}hostSHM;

typedef struct crazyCDT * crazyADT;

/* Inicia una conexion */
crazyADT open_conn (genHostT g_host, const char * conn_type);

/* Envia Informacion */
int send_data (crazyADT crazy, char * s_msg, int size);

/* Recibe Informacion */
int rcv_data (crazyADT crazy, char * r_msg, int size);

/* Cerrar Conexion */
int close_conn (crazyADT crazy);

/* Funciones Especiales */

int get_fd (crazyADT crazy);

#endif /*CRAZY_H_*/
